#ifndef POINTLIGHTSOURCE_H
#define POINTLIGHTSOURCE_H

#include "ilightsource.h"
#include "point.h"

class PointLightSource : public ILightSource
{
public:
    PointLightSource(const Point &location);
    void applyCameraTransformation(const Camera &camera);
    void glSetup(int light_id) const;
    virtual LightIntensity intensity(const Point &p) const;
    virtual Vector direction(const Point &p) const;
    ILightSource* clone() const;

    double constant_distance_factor() { return constant_distance_factor_; }
    double linear_distance_factor() { return linear_distance_factor_; }
    double quadratic_distance_factor() { return quadratic_distance_factor_; }
    void set_constant_distance_factor(double f) { constant_distance_factor_ = f; }
    void set_linear_distance_factor(double f) { linear_distance_factor_ = f; }
    void set_quadratic_distance_factor(double f) { quadratic_distance_factor_ = f; }

private:
    Point location_;
    double constant_distance_factor_;
    double linear_distance_factor_;
    double quadratic_distance_factor_;

};

#endif // POINTLIGHTSOURCE_H
